package cn.ekgc.carddemo.controller;

import cn.ekgc.carddemo.entity.Student;
import cn.ekgc.carddemo.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/student")
public class StudentController {
    @Autowired
    private StudentService studentService;
    @PostMapping("/save")
    @ResponseBody
    public Student save(Student student){
        studentService.save(student);
        return student;
    }
}
